package hos.map.distance;

import java.util.List;

import hos.map.coordinate.LatLng;
import hos.map.tool.CalculatorUtils;

/**
 * <p>Title: Vincenty </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023-12-10 22:12
 */
public class DistanceCalculatorVincenty implements DistanceCalculator {
    @Override
    public BearingDistanceCache distance(LatLng p1, LatLng p2) {
        return CalculatorUtils.distanceVincenty(p1, p2);
    }

    @Override
    public LatLng offset(LatLng from, double distanceInMeter, double bearing) {
        return CalculatorUtils.offsetVincenty(from, distanceInMeter, bearing);
    }

    @Override
    public boolean isPolygonContains(List<LatLng> polygon, LatLng point) {
        return CalculatorUtils.isPolygonContains(polygon, point);
    }

}
